package xyz.schwi.cels.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author schwi
 * @date 2021/10/04 23:43
 */
@Data
@NoArgsConstructor
public class ErrorWord extends Word {
    private Integer errorTime;

    public ErrorWord(Base base, Integer errorTime) {
        super(base.getEn(), base.getCn());
        this.errorTime = errorTime;
    }

    public ErrorWord(String en, List<String> cn, Integer errorTime) {
        super(en, cn);
        this.errorTime = errorTime;
    }

    @Override
    public String save() {
        return super.save() + " " + errorTime;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
